package com.fmboy.MXH.nav.controller;

import com.fmboy.MXH.nav.utils.UserContext;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@CrossOrigin
@Tag(name = "Hello Controller", description = "Hello API")
@RestController
@RequestMapping
public class HelloController {
    @Operation(summary = "返回欢迎信息", description = "返回欢迎信息的HTML字符串")
    @GetMapping
    public String hello() {
        System.out.println(UserContext.getUserId());
        return "<h1>欢迎来到，喵星汇-导航 >>> https://mxh.fmboy.com</h1>";
    }
}